﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Technoera.Common.QueryModel.Basic
{
    public sealed class ScalarPropertyCriterion : ScalarCriterion
    {
        /// <summary>
        /// Create a new criterion for a scalar property.
        /// </summary>
        /// <param name="propertyPath">The path of the child property (i.e. Description or WrittenBy.FullName).</param>
        /// <param name="op">The operator for the criterion.</param>
        /// <param name="value">The scalar value for the parameter.</param>
        public ScalarPropertyCriterion(string propertyPath, QueryOperator op, object value)
        {
            PropertyPath = propertyPath;
            Operator = op;
            Value = value;
        }

        public QueryOperator Operator { get; set; }

        public object Value { get; set; }
    }
}
